package com.service.impl;

import com.dao.AuctionDAO;
import com.entity.Auction;
import com.service.AuctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("auctionService")
public class AuctionServiceImpl implements AuctionService {
    @Autowired
    private AuctionDAO auctionDAO;
    @Override
    public List<Auction> selectAll() {
        return auctionDAO.selectAll();
    }

    @Override
    public void insert(Auction auction) {
        auctionDAO.insert(auction);
    }

    @Override
    public void delete(Integer auctionId) {
        auctionDAO.delete(auctionId);
    }

    @Override
    public void update(Auction auction) {
        auctionDAO.update(auction);
    }

    @Override
    public Auction selectById(Integer auctionId) {
        return auctionDAO.selectById(auctionId);
    }
}
